#ifndef MLANG_MAIN_MLANG_JAVAMODULE_H
#define MLANG_MAIN_MLANG_JAVAMODULE_H

#include <Define.h>

#include <cstring>

#include <main/mlang/MlangModule.h>

namespace multilang {

class JavaModule : public MlangModule {
public:
    virtual MlangClass* findClass(const char* name) override;
    virtual MlangFunc* findFunc(const char* name, const char* type) override;
};

class JavaClass : public MlangClass {
public:
    virtual MlangObject* createObject() override;
    virtual MlangFunc* findConstructor(const char* type) override;
    virtual MlangFunc* findFunc(const char* name, const char* type) override;
    virtual MlangFunc* findDestructor(const char* type) override;

    friend JavaModule;
};

class JavaFunc : public MlangFunc {
public:
    virtual const char* getType() override;
    virtual byte_t callByte(...) override;
    virtual short_t callShort(...) override;
    virtual int_t callInt(...) override;
    virtual long_t callLong(...) override;
    virtual float_t callFloat(...) override;
    virtual double_t callDouble(...) override;
    virtual bool_t callBool(...) override;
    virtual object_t callObject(...) override;

    friend JavaModule;
    friend JavaClass;
};

}

#endif